<template>
  <div class="hello">
    <!-- 首页顶部 -->
    <div class="head">
      <div>
        <span class="text_top">您好，欢迎来到百方网！</span>
        <a href>请登录</a>
        <a href>免费注册</a>
        <a href>忘记密码？</a>
      </div>
      <div class="head_right">
        <a href @mouseover="mouseover">
          <img src="../assets/imgs/tb.jpg" alt /> 会员中心
        </a>
        <a href>服务项目</a>
        <a href>
          <img src="../assets/imgs/tb.jpg" alt /> 网站导航
        </a>
        <a href>
          <img src="../assets/imgs/tb.jpg" alt /> 手机版
        </a>
      </div>
    </div>
    <div class="down_nav" ref="down_nav"  @mouseleave="mouseleave">
      <ul>
        <li>发布产品</li>
        <li>发布求购</li>
        <li>发布新闻</li>
        <li>友情链接</li>
      </ul>
    </div>
    <!-- logo部分 -->
    <div class="logos">
      <img class="logo_left" src="http://www.byf.com/skin/byf2016css/images/logo.jpg" alt />
      <div class="logo_cen">
        <div>
          <ul>
            <li class="Vertical">
              <a href>产品</a>
            </li>
            <li class="Vertical">
              <a href>供应商</a>
            </li>
            <li class="Vertical">
              <a href>求购</a>
            </li>
            <li>
              <a href>资讯</a>
            </li>
          </ul>
        </div>
        <div class="search">
          <input type="text" />
          <div>搜索</div>
        </div>
      </div>
      <img class="logo_right" src="http://www.byf.com/skin/byf2016css/images/caigou240.jpg" alt />
    </div>
    <!-- logo下的导航 -->
    <div class="logo_nav">
      <div class="logo_nav_left">行业市场</div>
      <div>
        <ul class="nav nav-pills">
          <li role="presentation">
            <a href="#">Home</a>
          </li>
          <li role="presentation">
            <a href="#">Profile</a>
          </li>
          <li role="presentation">
            <a href="#">Messages</a>
          </li>
          <li role="presentation">
            <a href="#">Messages</a>
          </li>
          <li role="presentation">
            <a href="#">Profile</a>
          </li>
          <li role="presentation">
            <a href="#">Messages</a>
          </li>
          <li role="presentation">
            <a href="#">Messages</a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  created() {
    console.log($);
  },
  methods: {
    mouseover() {
      this.$refs.down_nav.style = "display:block";
    },
    mouseleave() {
      this.$refs.down_nav.style = "display:none";
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
a,
.text_top {
  font-size: 13px;
}
.head {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  .head_right {
    a {
      margin-left: 50px;
    }
  }
}
.down_nav {
  display: none;
  position: absolute;
  background-color: rgb(255, 255, 255);
  right: 505px;
  padding: 10px;
  border: 0.5px solid #cccccc;
  ul {
    li {
      margin: 5px 10px;
      font-size: 13px;
    }
  }
}
.logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  .logo_left {
    width: 382px;
    height: 51px;
    margin-top: 20px;
  }
  .logo_cen {
    ul {
      margin: 5px 0;
      .Vertical {
        border-right: 1px solid #cccccc;
      }
      li {
        display: inline-block;
        a {
          margin: 0 10px;
          font-size: 12px;
        }
      }
    }
    .search {
      display: flex;

      input {
        width: 380px;
        height: 40px;
        border: 2px solid #ff5700;
      }
      div {
        width: 100px;
        height: 40px;
        background-color: #ff5700;
        text-align: center;
        line-height: 40px;
        font-weight: 800;
        color: white;
        font-size: 18px;
      }
    }
  }
  .logo_right {
    width: 240px;
    height: 100px;
  }
}
.logo_nav {
  display: flex;
  width: 100%;
  height: 40px;
  margin: 10px 0;
  background-color: #fe6e0e;
  .logo_nav_left {
    width: 180px;
    background-color: #ff5601;
    text-align: center;
    line-height: 40px;
    font-size: 16px;
    color: #fff !important;
    font-weight: 800;
  }
  li {
    width: 136px;
    height: 40px;
    background-color: #fe6e0e;
    text-align: center;
    line-height: 40px;
    a {
      font-size: 16px;
      color: #fff !important;
    }
    a:hover {
      background-color: #ff5601 !important;
    }
  }
  li:hover {
    background-color: #ff5601 !important;
  }
}
</style>
